/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2024-01-30
 * Time:16:08
 */
public class myArray<T> {
    public Object[] array = new Object[10];

    public void set(int pos,T val) {
        array[pos] = val;
    }

    public T get(int pos) {
        return (T)array[pos];  //把返回的类型强转为指定类型
    }
}
